package cn.signalpha.modules.shop.service;

import cn.signalpha.modules.shop.entity.TransportFee;
import cn.signalpha.modules.shop.mapper.TransportFeeMapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;


/**
 *  服务类
 *
 * @author suguangjun
 */
@Service
public class TransportFeeService extends ServiceImpl<TransportFeeMapper, TransportFee> {

	public List<TransportFee> listByTransportId(Long transportId) {
		return baseMapper.selectList(Wrappers.<TransportFee>lambdaQuery().eq(TransportFee::getTransportId, transportId));
	}

    public void removeByTransportId(Long transportId) {
        baseMapper.delete(Wrappers.<TransportFee>lambdaQuery().eq(TransportFee::getTransportId, transportId));
    }

	public void removeByTransportIds(List<Long> transportIds) {
		baseMapper.delete(Wrappers.<TransportFee>lambdaQuery().in(TransportFee::getTransportId, transportIds));
	}

}
